package com.ms.mapper;

import com.ms.pojo.Employee;
import com.ms.pojo.Employee_login;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface UserMapper {
    /**
     * 根据用户名和密码查询用户
     * @param empUsername 用户名
     * @param empPassword 密码
     * @return 用户信息
     */
    @Select("SELECT * FROM employee_login WHERE emp_username = #{empUsername} AND emp_password = #{empPassword} ORDER BY create_time DESC LIMIT 1")
    Employee_login selectByUsernameAndPassword(String empUsername, String empPassword);
// ... existing code ...
    // ... existing code ...


    @Insert("INSERT INTO employee_login(emp_username, emp_password, status, create_time) VALUES(#{empUsername}, #{empPassword}, #{status}, #{createTime})")
    int insert(Employee_login employeeLogin);
// ... existing code ...

}
